<div class="sidebar_box">
  <h2>
    <span class="header">Avatar</span>
    <% unless hide_edit_links? %>
      <span class="edit_link">
        <%= link_to "(edit)", :controller => "avatar", :action => "upload" %>
      </span>
    <% end %>
    <br clear="all" />
  </h2>
  <div class="sidebar_box_contents">
    <% if @user.avatar.exists? %>
      <%= avatar_tag(@user) %>
    <% elsif not hide_edit_links? %>
      No avatar yet? 
      <%= link_to "Upload one!", :controller => "avatar", 
                                 :action => "upload" %>
    <% end %>
  </div>
</div>